<?php
require_once '../config.php';

// Instantiate the dispatcher configuration object.
$config = new helloMvcConfiguration();

/*
//$session = ezcPersistentSessionInstance::get();

//create db instance if necessary
try {
	$db = ezcDbInstance::get();
	print 'use';
}
catch (Exception $e) {
	$db = ezcDbFactory::create( 'mysql://root@localhost/ndd' );
	ezcDbInstance::set( $db, 'db' );
	ezcDbInstance::chooseDefault( 'db' );
	
	$session = new ezcPersistentSession( $db,
                  						 new ezcPersistentCacheManager( new ezcPersistentCodeManager( '../lib/classes/db/definitions/' ) ) );
	ezcPersistentSessionInstance::set( $session ); // set default session
	print 'create';
}
*/

// Send the configuration to the dispatcher, and run it.
$dispatcher = new ezcMvcConfigurableDispatcher( $config );
$dispatcher->run();

?>
